<%@ page import="mybatis.pojo.Subject" %>
<%@ page import="mybatis.services.SubjectServerices" %><%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/1
  Time: 15:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加课程</title>
</head>
<body>
<%

    request.setCharacterEncoding("utf-8");
    String subName = request.getParameter("subName");
    int classHour = Integer.parseInt(request.getParameter("classHour"));
    Long gradeId = Long.parseLong(request.getParameter("gradeId"));
//    Subject subject = new Subject(subName, classHour, gradeId);
    int add = SubjectServerices.ME.add(new Subject(subName, classHour, gradeId));
    if (add > 0) {
        out.print("添加成功");
    }

%>
<p>
   科目名称： <%=subName
%>
    科目学时： <%=classHour
%>
    科目编号： <%=gradeId
%>
</p>

</body>
</html>
